<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
		<style>
			
		</style>
		<script>
			
			/*
				Object.assign();
					合并对象
				静态方法，函数上面的方法
			*/
			var o = {a:1};
			var obj = {b:2};

			// 返回值是第一个对象
			let oo = Object.assign(o,obj,{c:1})

			console.log(o);
			console.log(oo === o);

			// 克隆一个对象
			let newObj = Object.assign({},obj)

			console.log(newObj);
		</script>
	</head>

	<body>
		
	</body>
</html>